package com.example.enums;

/**
 * @author ：chengyoubang
 * @version ：V1.0
 * @program ：first-service
 * @date ：Created in 2023/12/24 15:17
 * @description ：
 */
public enum ColleagueRelationshipEnum {
    HEN_ZAO_GAO("很糟糕",1,0.9),
    ZAO_GAO("一般糟糕",2,0.95),
    NORMAL("正常",3,1.0),
    HAI_KE_YI("挺融洽",4,1.05),
    NICE("很好",4,1.1)
    ;
    private String name;
    private Integer type;
    private Double ratio;

    ColleagueRelationshipEnum(String name, Integer type, Double ratio) {
        this.name = name;
        this.type = type;
        this.ratio = ratio;
    }

    public static Double getRatio(Integer type){
        for(ColleagueRelationshipEnum rest:ColleagueRelationshipEnum.values()){
            if(rest.type.equals(type))
                return rest.ratio;
        }
        return null;
    }
}

